export default {
  created() {
    if (this.item && this.item.vdStrMinLength !== undefined) {
      var label = this.item.getLabel();
      this.$emit("componentNotify", "addRule", {
        field: this.item.name,
        rules: [
          {
            required: true,
            message: "请填写" + label
          },
          {
            type: "string",
            min: this.item.vdStrMinLength,
            message: label + "不得低于" + this.item.vdStrMinLength + "个字符"
          }
        ]
      });
    }
  }
};
